/*
 * @Author: Aro
 * @Date: 2024-01-31 10:47:57
 */
import 'package:flutter/material.dart';
import 'package:flutter_baseui/routers/fluro_navigator.dart';
import 'package:flutter_baseui/widgets/model/icon_event_model.dart';
import 'package:flutter_baseui/widgets/nav_bar_kit.dart';
import 'package:flutter_baseui/widgets/list_view_kit.dart';
import 'package:flutter_baseui/utils/screen_util.dart';
import 'package:flutter_baseui/widgets/tab_bar_top_kit.dart';

class NetworkScreen extends StatefulWidget {
  const NetworkScreen({super.key});

  @override
  State<NetworkScreen> createState() => _NetworkScreenState();
}

class _NetworkScreenState extends State<NetworkScreen> {
  Widget listItem(BuildContext context, int index) {
    Color color = index % 2 == 0 ? Colors.brown : Colors.blueGrey;
    return Container(
      height: 50,
      width: 50,
      color: color,
      child: Text('$index'),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xFFEDF0F2),
      body: Column(
        children: [
          NavBarKit(
            title: 'Network演示',
            leftConfig: IconEventModel(
              icon: const Icon(Icons.arrow_back),
              onTap: () {
                FluroNaviagtor.goBack(context);
              },
            ),
          ),
          // SizedBox(
          //   width: ScreenUtil.appWidth(context),
          //   height: 400,
          //   child: ListViewKit(
          //     itemFn: listItem,
          //     itemCount: 10,
          //     // direction: Axis.horizontal,
          //   ),
          // ),
          const Expanded(
            child: TabBarTopKit(),
          )
        ],
      ),
    );
  }
}
